package com.tax.config.page;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.List;

/**
 * @Description: 分页返回结果
 * @ClassName PageResult
 * @Author lim@udiannet.com
 * @DATE 2018-11-26
 * @Version 1.0
 **/
@Data
public class PageResult<T> {
    private long index;
    private long size;
    private long total;
    private List<T> resultList;

    public void load(Page page) {
        if (page != null) {
            this.size = page.getSize();
            this.index = page.getCurrent();
            this.total = page.getTotal();
        }
    }

}
